@extends('host.custom.common.common')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            pagingObj : {
                total : 0,
                perpage : 7,
                page : 1
            }
        };
    </script>
@stop

@section('body')
        <!-- top_test -->
    <div id="top_test"> </div>

    <!-- web_logo_search -->
    <div id="web_logo_search"> </div>

    <!-- comm_nav -->
    <div id="comm_nav"> </div>


    <div class="com-w mt20">
        <div class="wrapper clearfix">
            <div  class="w220 mr20 comm-left-menu">
                <div class="menu-top-title">供应商中心</div>
                <div id="leftmenuitems">
                </div>
            </div>

            <div class="w960 comm-main">
                <div class="main-release clearfix">
                    <div class="main-release-nav">
                        您当前的位置：首页 > 供应商中心 > 我的采购商
                    </div>
                    <div class="main-release-title">
                        <span class="icons"></span>
                        <span class="release-title-h3 f16">
                            我的采购商
                        </span>
                    </div>
                    <div class="main-release-from">

                        <div id="commTabs_1" class="comm-tabs">
                            <div class="comm-tabs-head">
                                <div class="head-item current">
                                    采购商列表
                                </div>
                            </div>
                        </div>


                        <div class="h60">
                            <div class="mt30 comm-oper-line w700 clearfix">
                                <div class="oper-item lbl-txt">授权终止日期: </div>
                                <div class="oper-item">
                                    <input type="text" class="w130 h30" id="startTime" maxlength="16" value=""/>
                                    ~
                                    <input type="text" class="w130 h30" id="endTime" maxlength="16" value=""/>
                                </div>
                                <div class="oper-item lbl-txt ml10">公司名称: </div>
                                <div class="oper-item">
                                    <input type="text" class="w130 h30" id="name" maxlength="20" value=""/>
                                </div>

                                <div class="btn btn-warn btn-70x30 ml10" onclick="queryList()">查询</div>
                            </div>
                        </div>
                        <div class="comm-tbl">
                            <div class="head">
                                <ul class="clearfix">
                                    <li class="w200"> 公司名称 </li>
                                    <li class="w100"> 采购商名称 </li>
                                    <li class="w100"> 状态 </li>
                                    <li class="w100"> 申请时间 </li>
                                    <li class="w100"> 授权终止日期 </li>
                                    <li class="w100"> 总代销商品 </li>
                                    <li class="w260"> 操作 </li>
                                </ul>
                            </div>
                            <div id="commTabs_1_body" class="body clearfix">

                                <ul class="one-line clearfix">
                                    <li class="w200 f-orange"> 重庆嘿咖啡 123456 贸易有限公司 </li>
                                    <li class="w100 f-grey-1"> 张依2 </li>
                                    <li class="w100 f-grey-1"> 停止授权 </li>
                                    <li class="w100 f-grey-1"> 2015-09-01 </li>
                                    <li class="w100 f-grey-1"> 2016-09-01 </li>
                                    <li class="w100 f-grey-1"> 100 </li>
                                    <li class="w260">
                                        <div class="btn btn-default btn-70x30">查看</div>
                                        <div class="btn btn-warn btn-70x30">商品授权</div>
                                        <div class="btn btn-important btn-70x30">终止</div>
                                    </li>
                                </ul>
                            </div>
                            <div id="comm-paging" class="comm-paging" style="float: right;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- foot_nav -->
    <div id="foot_nav"> </div>

    <div id="bottom_main">  </div>

    <script type="text/template" id="item-template">
        <%_.each(obj, function(item){%>

        <ul class="one-line clearfix" data-id="<%=item.id%>">
            <li class="w200 f-orange"> <%=item.companyname%> </li>
            <li class="w100 f-grey-1"> <%=item.buyername%> </li>
            <li class="w100 f-grey-1"> <%=item.state%> </li>
            <li class="w100 f-grey-1"><%=item.applydate%>  </li>
            <li class="w100 f-grey-1"><%=item.enddate%>  </li>
            <li class="w100 f-grey-1"><%=item.amount%>  </li>
            <li class="w260">
                <a class="btn btn-default btn-70x30 ck" href="<%=item.authoryUrl%>">查看</a>
                <% if(item.operate == "1") { %>
                <a class="btn btn-warn btn-70x30 sq" href="<%=item.detailUrl%>">商品授权</a>
                <div class="btn btn-important btn-70x30 zz" >终止</div>
                <% } else { %>
                <div class="btn btn-warn btn-70x30 " style="visibility:hidden;">商品授权</div>
                <div class="btn btn-important btn-70x30" style="visibility:hidden;" >终止</div>
                <% } %>
            </li>
        </ul>

        <%});%>
    </script>
    <!-- 确认框 -->
    <script type="text/template" id="item-confirm">
        <div class="dialog-div">
            <div>您将对该采购商终止授权，你确认终止吗？</div>
            <div class="price-game-btn">
                <div class="btn btn-gray btn-w140x40 remove">取消</div>
                <div class="btn btn-warn btn-w140x40" id="tj">提交</div>
            </div>
        </div>
    </script>
    <!-- 错误信息框 -->
    <script type="text/template" id="item-error">
        <div class="dialog-div">
            <div>操作错误，请重新操作</div>
            <div class="price-game-btn">
                <div class="btn btn-warn btn-w140x40" id="ok" code="">确认</div>
            </div>
        </div>
    </script>

    <link rel="stylesheet" href="/assets/b2b/css/jquery-ui.min.css">
    <script type="text/javascript" src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/jquery.validate.min.js"></script>
    <script src="/assets/b2b/js/libs/messages_zh.js"></script>
    <script src="/assets/b2b/js/libs/jquery.paging.min.js"></script>
    <script src="/assets/b2b/js/libs/jquery-ui.min.js"></script>
    <script src="/assets/b2b/js/pageModules/supplyer/S6.js"></script>

@stop